package com.lemon.lemonai.entity.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Description: 响应给前端的结果类
 * @Author: lemon
 * @CreateTime: 2025-03-26  18:11
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
public class Result {
    private Integer ok;
    private String msg;

    private Result(Integer ok, String msg) {
        this.ok = ok;
        this.msg = msg;
    }

    public static Result ok() {
        return new Result(1, "ok");
    }

    public static Result fail(String msg) {
        return new Result(0, msg);
    }
}